import java.util.Arrays;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86138
 * Date: 2024-07-05
 * Time: 14:06
 */
public class Seven {
    //奇数在偶数前面

    public static void front(int[] array){
        int left = 0;
        int right = array.length-1;
        while(left<right){

            while(array[left]%2!=0&&left<right){
                left++;
            }

            while(array[right]%2==0&&left<right){
                right--;
            }

            int t = 0;
            t = array[left];
            array[left] = array[right];
            array[right] = t;
        }
    }

    public static void swap(int[] array,int a,int b){
        int t = 0;
        t = array[a];
        array[a] = array[b];
        array[b] = t;
    }

    public static void main1(String[] args) {
        int [] array = {1,2,3,4,5};
        front(array);
        System.out.println(Arrays.toString(array));
    }


    public static int[] fun1(int[] array,int tmp){
        int[] ret = new int[]{-1,-1};
        for(int i=0;i<array.length;i++){
            for(int j=i+1;j<array.length;j++){
                if(array[i] + array[j] == tmp){
                    ret[0] = i;
                    ret[1] = j;
                }
            }
            }
        return ret;
    }


    public static void main2(String[] args) {
        int [] array= {1,2,3,4,5,6,7,8,9};
        Scanner sc = new Scanner(System.in);
        int tmp = sc.nextInt();
        int[] ret = fun1(array,tmp);
        System.out.println(Arrays.toString(ret));
    }

    public static void main(String[] args) {

    }
}
